home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 41.zip / BS1 part 41 / Devpac 2.12 disk 2.adf / arp / NewPro.arc / SyncRun < prev    next >
Text File  |  1988-02-22  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.      SyncRun(33.4)      ARP Programmers Library     SyncRun(33.4)
  5.  
  6.  
  7.  
  8.      NAME
  9.       SyncRun -- Run a process and wait for    its completion.
  10.  
  11.      SYNOPSIS
  12.       rc = SyncRun(    "Filename", "args", Input, Output)
  13.        d0            a0          a1      d0     d1
  14.  
  15.      FUNCTION
  16.       SyncRun loads    a program from disk, searching the users Path
  17.       as set by the    Path command, run it, and return the exit
  18.       status of the    program    to you,    after first unloading the
  19.       program.  You    may set    the default Input and Output handles
  20.       for the new process, if you supply NULL, the new process
  21.       will inherit your processes default input and    output.
  22.  
  23.       This function    has been made as safe as possible, all task
  24.       private data stored before the new process gets your TCB,
  25.       and it is restored on    exit.  Furthermore, this function
  26.       cooperates with arp.library's    tracking functions to preserve
  27.       your ResList and resources as    well as    correctly handling the
  28.       new tasks calls to the tracking functions, if    any are    made.
  29.  
  30.       BCPL programs    contain    bugs which cause them to be inable to
  31.       receive command lines    from this function.  All the programs
  32.       from the rest    of the world will receive their    command    lines
  33.       just fine, as    well BCPL programs when    they decide to join
  34.       the rest of us.
  35.  
  36.      INPUTS
  37.       "Filename" --    the filename of    the process you    wish to    load
  38.           and run.  The    directory search path will be searched
  39.           for this name.
  40.  
  41.       "Arguments" -- The arguments you wish    to pass    to this
  42.           process.  Note that the arguments are    passed without
  43.           parsing, so you should not expect io_redirection ( <
  44.           > ) to work.
  45.  
  46.       Input    -- The standard    input for the new process. If zero, it
  47.           will inherit your processes default input.  This
  48.           filehandle must be obtained and released by you.
  49.  
  50.       Output -- The    standard output    for the    new process.  If zero,
  51.           it will share    your processes default output. This
  52.           filehandle must be obtained and released by you.
  53.  
  54.      RESULT
  55.       If the return    from this function is positive or zero,    it is
  56.       the return code of the process executed.  ZERO means
  57.       succesful termination.
  58.  
  59.       If the result    is negative, this function is returning    an
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 2/22/88)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      SyncRun(33.4)      ARP Programmers Library     SyncRun(33.4)
  71.  
  72.  
  73.  
  74.       error    to you indicating that it could    not execute or load
  75.       the process.
  76.  
  77.      New for V33
  78.       This function    now releases memory chained into the tasks
  79.       memlist by the child.     Any memory allocated by the parent is
  80.       of course not    freed until exit.
  81.  
  82.       This function    calls LoadPrg()    to obtain the segment to run.
  83.       This is a V33    function which searches    first the
  84.       ResidentList,    then the user speced path.
  85.  
  86.      BUGS
  87.       CLI programs only may    use this function, it will return an
  88.       error    if a WorkBench or other    process    attempts to call it.
  89.  
  90.      SEE ALSO
  91.       LoadPrg(), UnLoadPrg(), AddResidentPrg(), ASyncRun()
  92.  
  93.      AUTHOR
  94.       SDB
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 2/22/88)
  130.  
  131.  
  132.  
  133.